package simulation.threads;

import simulation.initiatives.EnginePull;
import common.SimulationSettings;

public class EnginePullThread extends EnginePull implements Runnable {

  public EnginePullThread(SimulationSettings settings) {
    super(settings);
  }
  
  public synchronized void step() {
    notify();
  }

  public void run() {
    while (true) {
      try {
        synchronized (this) {
          wait();
        }
      }
      catch (InterruptedException e) {
        e.printStackTrace();
      }
      super.step();
    }
  }
}
